<%@page import="ext.mango.functions.Func"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String idxCtx = request.getContextPath();
EOAAUser u = (EOAAUser)request.getSession().getAttribute(EOAAUser.class.getName());
String headerTheme = u.getTheme();
%>
<!DOCTYPE html>
<html>
<head>
<title><%=Func.getAppName(request) %></title>
<link rel="shortcut icon" type="image/ico" href="<%=idxCtx%>/favicon.ico" />
<link  rel="stylesheet" type="text/css" href="<%=idxCtx%>/aa/css/<%=headerTheme%>.css">
<%@include file="/common/jsp/header.jsp" %>
<script type="text/javascript">
<%String welcome = Func.welcome(usr);%>
<%String themeOption = Func.themeOption(usr);%>
var welcome = "<%=welcome%>";
var themeOption = <%=themeOption%>;
Ext.tip.QuickTipManager.init();
function changeTheme(theme){
	Ext.Ajax.request({
		  url : getPath('/aa/po/index.do'),
		  params : {
			  md : 'changeTheme',
			  THEME: theme.text
		  },
		  actionMethods: 'POST',
		  success : function(response) {  
          	var ret = Ext.JSON.decode(response.responseText);
          	if(ret.success){
          		window.location.href="<%=ctx%>";
          	}
          	else {
          		Ext.MessageBox.alert(str_common_error,ret.msg);
          	}
        }
	});
}
function destory() {
	Ext.Ajax.request({
		url : ctx + '/aa/po/login.do',
		params : {
			md : 'tc'
		},
		success : function(response) {
          	window.location.href="<%=ctx%>";
		}
	});
}

</script>
<script type="text/javascript" src="<%=ctx%>/aa/lang/index-<%=lang%>.js"></script>
<script type="text/javascript" src="<%=ctx%>/aa/js/Indextoolbar.js"></script>
<script type="text/javascript" src="<%=ctx%>/aa/js/index.js"></script>
</head>
<body onunload="destory()">
<%@include file="/common/jsp/mask.jsp"%>
</body>
</html>